package javaBase.nowcoder.HJ14_B_字符串排序;

import java.util.Scanner;
import java.util.Arrays;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int nextInt = scanner.nextInt();
        String[] arrays = new String[nextInt];
        for (int i = 0; i < nextInt; i++) {
            arrays[i] = scanner.next();

        }
        Arrays.sort(arrays);
        for (String array : arrays) {
            System.out.println(array);
        }
    }
}
